<template>
	<div class="allcontainer">
		<div class="h2">虚拟字段列表</div>
		<div class="home-form">
			<a-button type="primary" class="btn">申请加入</a-button>
		</div>
		<div class="table bg-white" style="padding-top: 20px;">
			
			<el-table :data="data" v-loading="loading" :max-height="tableHeight" highlight-current-row
				style="width: 100%;">
				<el-table-column prop="TypeName" label="签到类型" min-width="100" align="center"></el-table-column>
				<el-table-column prop="AddTime" label="签到时间" min-width="260" align="center">
					<template slot-scope="scope">
						{{ scope.row.SignTime }}
					</template>
				</el-table-column>
				<el-table-column prop="IsSign" label="是否签到" min-width="120" align="center">
					<template slot-scope="scope">
						<a-tag @click="setSign(scope.row)" style="cursor: pointer;"
							:color="scope.row.IsSign ? 'blue' : 'red'">{{ scope.row.IsSign ? '已签到' : '未签到' }}</a-tag>
					</template>
				</el-table-column>
				<el-table-column prop="IsEnable" label="操作" width="165">
					<template slot-scope="scope">
						<div class="user-btn user-btn-auto">
							<span class="signin" @click="UserActivitySignRecord(scope.row)">申请记录</span>
						</div>
					</template>
				</el-table-column>
			</el-table>
		</div>
	</div>
</template>

<script>
	import Func from '@/utils/func';
	import {
		DoGetCommonClubApplyFormList
	} from '@/api/follow';
	const data = [];
	export default {
		components: {},
		data() {
			return {
				data,
				form: this.$form.createForm(this, {
					name: 'advanced_search'
				}),
				loading: false,
				tableHeight: parseFloat(window.innerHeight - 160),
			};
		},
		computed: {},
		created() {
			this.getList();
		},
		mounted() {},
		methods: {
			async getList() {
				this.loading = true;
				let data = {};
				data.clubID = this.$route.query.ID
				let res = await DoGetCommonClubApplyFormList(data);
				this.loading = false;
				this.data = res.data.data;
			},
			UserActivitySignRecord(text) {
				this.$router.push({
					name: 'ActivitySignRecord',
					query: {
						ID: text.ID,
						ChairmanNo: text.ChargeUserNo
					}
				});
			},
			closeFun(data) {}
		}
	};
</script>
